//
//  TSaleInfoDAL.h
//  CarSalesMS_GCX
//
//  Created by Ssky on 2016/11/7.
//  Copyright © 2016年 Tony. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "TSaleInfoModel.h"

@interface TSaleInfoDAL : NSObject

+ (NSArray<TSaleInfoModel *> *)loadListWithSql:(NSString *)sql;

+ (NSArray<TSaleInfoModel *> *)loadListFromTSaleInfoWithUserNo:(NSString *)userNo businessNo:(NSString *)businessNo;

+ (NSArray<TSaleInfoModel *> *)loadListWithOrderNo:(NSString *)orderNo;

+ (NSArray<TSaleInfoModel *> *)loadListWithUserNo:(NSString *)userNo businessNo:(NSString *)businessNo daysBefore:(NSInteger)daysBefore;


#pragma mark - insert
+ (BOOL)insertIntoTSaleInfoWithArr:(NSArray<TSaleInfoModel *> *)saleModelList;

+ (NSInteger)insertIntoTSaleInfoWithModel:(TSaleInfoModel *)saleModel;


#pragma mark - update
+ (void)updateSaleModel:(TSaleInfoModel *)saleModel;

+ (void)updateSaleList:(NSArray<TSaleInfoModel *> *)saleList;

@end
